/**
 * This is an interface for Student entity and list all methods
 *  available on the student to query.
 */

package com.athena.api.student;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.athena.api.model.AttendanceRecord;
import com.athena.dal.entities.Marks;
import com.athena.dal.entities.RoutineInstance;

/**
 * Student Interface for accessing information related to a student.
 */
public interface IStudentService {
	
	/**
	 * Get the class Routine for this student. Can be displayed either
	 * for all the subjects or for a specific subject. The duration
	 * can be a week/month/year. If user specifies only start-date,
	 * this routine will display all the effective schedules applicable
	 * in the current academic year. If student specifies period 
	 * (weekly/ monthly/daily/all), such applicable routines will be 
	 * displayed.
	 * @param classId
	 * @param subjectid
	 * @param startDate
	 * @param endDate
	 * @return List of Routine Objects
	 */
	public List<RoutineInstance> getSubjectRoutine(int studentid, int subjectid, Date startDate, Date endDate);	
	
	public List<RoutineInstance> getClassRoutine(int studentid, Date startDate, Date endDate);
	
	public List<RoutineInstance> getClassRoutine(int studentid);

	
	/**
	 * Display Performance Results of this student by Exam Type.
	 * 
	 * Returned results are in this format :
	 * 1st unit test :
	 * Maths - 20
	 * Hindi - 15
	 * Half-Yearly:
	 * English - 50
	 * Science - 50
	 * @param List<examTypes>
	 * @return e.g Map<ExamId, Map<Maths,20>> 
	 */
	
	public Map<Integer,Map<String, Marks>> getPerformanceReportbyExamType(int studentId, List<Integer> examTypes);
	
	public Map<Integer,Map<String, Integer>> getPerformanceReportbyExamType(int studentId);
	
	/**
	 * Get the performance result of student since a date.
	 * The date can be any date since the student has joined.
	 * @param date
	 * @return e.g Map<ExamId, Map<Maths,20>>
	 */
	public Map<Integer,Map<String, Integer>> getPerformanceReportFromDate(int studentId, Date startdate);	

	/**
	 * This will return a structure of the following format:
	 * 
	 * 29th Sept : 8 - 9 - Present - Maths Class
	 *             9 - 10 - Absent - Hindi Class 
	 */
	public Map<Date, Set<AttendanceRecord>> getAttendanceBySubjects(int studentId,Date startDate, Date endDate);
	
	
	public Date[] absentClassesbySubjects(int studentId, Date startDate, Date endDate);
	/**
	 * This method will return the Attendance data, in case we are
	 * taking the attendance on daily basis instead of subject basis.
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	
	public Map<Date, Boolean> getAttendanceByDays(int studentId, Date startDate, Date endDate);
	
	
	public Date[] absentClassesbyDays(int studentId, Date startDate, Date endDate);
	
	
	
	/**
	 * This method will return days when the student was absent
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	
	public Date[] absentDays(int studentId, Date startDate, Date endDate);
	
	/**
	 * This method will return the fee paid in this academic year.
	 * Academic year information will be obtained from Class info.
	 * 
	 * @param startDate
	 * @param endDate
	 */
	public Map<Date, String> getFeePaymentHistory(int studentId, Date startDate, Date endDate);
	
	public Map<Date, String> feesPaid(int studentId);
	
	/**
	 * Pay the fee for this student.
	 * @param month
	 * @param amount
	 * @return acknowledgement with the Transaction details
	 */
	public String payFee(int studentId, Date Date, double amount);
	
	/**
	 * This method will return the fees due for this
	 * student.
	 * @return
	 */
	
	public double feeDue();
}